<template>
  <div class="home">
    <headerT></headerT>
    <div style="height:44px"></div>
    <bannerSwiper></bannerSwiper>
    <navigationBar></navigationBar>
    <footerBar></footerBar>
    <productList :products='productss'></productList>
    <div style="height:50px"></div>
    <toTop></toTop>
  </div>
</template>

<script>
import headerT from "../components/header";
import bannerSwiper from "../components/bannerSwiper";
import navigationBar from "../components/navigationBar";
import footerBar from "../components/footerBar";
import productList from "../components/productList";
import toTop from "../components/toTop";

export default {
  data(){
    return{
      productss:[]
    }
  },
  name: "home",
  components: {
    headerT,
    bannerSwiper,
    navigationBar,
    footerBar,
    productList,
    toTop
  },
  created() {
    this.axios
      .get("http://leeyiqing.site/product.php")
      .then(res => {
          console.log(res)
          this.productss = res.data
          })
      .catch(err => console.log(err));
  },
};

</script>

<style lang="less">
body,
html {
  height: 100%;
  width: 100%;
}
.home {
  background: #f6f6f6;
  width: 100%;
  height: 100%;
}
</style>
